package com.estate.framework.web.pojo;

import lombok.Data;
import java.util.HashMap;
import java.util.Map;

@Data
public class EnquiryFilter {
    private Integer contactId;
    private Integer listingId;
    private Integer projectId;

    public Map<String, String> toMap() {
        Map<String, String> map = new HashMap<>();
        if (contactId != null) {
            map.put("contact_id", contactId.toString());
        }
        if (listingId != null) {
            map.put("listing_id", listingId.toString());
        }
        if (projectId != null) {
            map.put("project_id", projectId.toString());
        }
        return map;
    }
}